import axios from 'axios';
import service from '../request/';

const controller = "Client"

/**
* select查找
* @param {*} data 
* @returns 
*/
function select(data: any) {
    return service({
        method: 'get',
        url: controller+'/select',
        params: data,

    })
}
/**
* 
分页
* @param {*} data 
* @returns 
*/
function query(data: any) {
    return service({
        method: 'get',
        url: controller + '/query',
        params: data,
    })
}
/*
修改
*/
function put(data: any) {
    return service({
        method: 'put',
        url: controller + '/Update',
        data: data,
    })
}
/**
* 查找单个
* @param {*} data 
* @returns 
*/
function get(data: any) {
    return service({
        method: 'get',
        url: controller+'/get',
        params: data,

    })
}

/**
* 删除
* @param {*} data 
* @returns 
*/
function del(data: any) {
    return service({
        method: 'delete',
        url: controller,
        params: data,
    })
}

/*
添加
*/
function Add(data: any) {
    return service({
        method: 'post',
        url: controller + '/Add',
        data: data,
    })
}

/**
* 
*查询全部
 @param {*} 
* @returns 
*/
function getall() {
    return service({
        method: 'get',
        url: controller + '/getall',
    })
}
export default {
   getall,
   query,
   del,
   get,
   put,
   Add,
   select
}